window.addEventListener('load',function(){
    var hour = document.querySelector('.h')
    var min = document.querySelector('.m')
    var sec = document.querySelector('.s')
    var inputTime =+new Date('2022-12-15 0:0:0')
    countTime()
    setInterval(countTime,1000)
    function countTime(){
        var nowTime = +new Date()
        var times = (inputTime - nowTime)/1000
        var h = parseInt(times/60/60%24)
        h=h<10 ?'0'+h:h
        hour.innerHTML = h
        var m = parseInt(times/60%60)
        m=m<10?'0'+m:m
        min.innerHTML=m
        var s = parseInt(times%60)
        s= s<10?'0'+s:s
        sec.innerHTML=s
    }
})